package com.shenda.device.handler.handlers;

import org.springframework.stereotype.Component;

import com.shenda.device.Constants;
import com.shenda.device.message.RespMsg;
import com.shenda.device.message.RespMsg_StopUpload;

/**
 * 停止上传数据
 * 
 * @author lifeng
 */
@Component
public class StopUploadHandler extends AbstractHandler {

	@Override
	protected boolean supportCmds(RespMsg resp) {
		return resp instanceof RespMsg_StopUpload;
	}

	@Override
	protected void doInnerHandle(RespMsg resp) {
		if (Constants.SUCCESS.equals(resp.getContent())) {
			resp.getDevice().uploadStop();
		}
	}
}
